From 0eeaa935b9a38cc1f4735b53c21ec0d9e507563e Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 20 Jun 2016 15:52:32 +0200 Subject: [PATCH] wayland: do not set PRIMARY selection if focus is lost If keyboard focus is (already) lost, do not advertise PRIMARY selection. https://bugzilla.gnome.org/show_bug.cgi?id=767848 --- gdk/wayland/gdkdevice-wayland.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index b19fd64b96..72d9baf5a6 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -1058,6 +1058,9 @@ primary_selection_selection (void *data, GdkWaylandSeat *seat = data; GdkAtom selection; + if (!seat->keyboard_focus) + return; + GDK_NOTE (EVENTS, g_message ("primary selection selection, device %p, data offer %p", gtk_primary_selection_device, gtk_primary_offer)); -- 2.30.2